
from django.http import HttpResponse
from django.views import View


class ClassView(View):
    # 定义一个类视图

    # 查询
    def get(self,request):
        # get
        print('ClassView get')
        return HttpResponse('ClassView get')

    # 增加
    def post(self,request):
        # post
        print('ClassView post')
        return HttpResponse('ClassView post')

    # 修改
    def put(self,request):
        # put
        print('ClassView put')
        return HttpResponse('ClassView put')

    # 删除
    def delete(self,request):
        # delete
        print('ClassView delete')
        return HttpResponse('ClassView delete')







